package com.ruoyix.ai.service;

import com.ruoyix.ai.domain.AiChatMessage;
import com.ruoyix.ai.domain.AiChatMessageSendReqVO;
import com.ruoyix.ai.domain.AiChatMessageSendRespVO;
import com.ruoyix.ai.domain.vo.AiChatMessageVo;
import com.ruoyix.ai.domain.bo.AiChatMessageBo;
import com.ruoyix.common.core.domain.R;
import com.ruoyix.common.core.page.TableDataInfo;
import com.ruoyix.common.core.domain.PageQuery;
import reactor.core.publisher.Flux;

import java.util.Collection;
import java.util.List;

/**
 * AI 聊天消息Service接口
 *
 * @author ruoyi
 * @date 2024-09-21
 */
public interface IAiChatMessageService {

    /**
     * 查询AI 聊天消息
     */
    AiChatMessageVo queryById(Long id);

    /**
     * 查询AI 聊天消息列表
     */
    TableDataInfo<AiChatMessageVo> queryPageList(AiChatMessageBo bo, PageQuery pageQuery);

    /**
     * 查询AI 聊天消息列表
     */
    List<AiChatMessageVo> queryList(AiChatMessageBo bo);

    /**
     * 新增AI 聊天消息
     */
    Boolean insertByBo(AiChatMessageBo bo);

    /**
     * 修改AI 聊天消息
     */
    Boolean updateByBo(AiChatMessageBo bo);

    /**
     * 校验并批量删除AI 聊天消息信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    public Flux<R<AiChatMessageSendRespVO>> sendChatMessageStream(AiChatMessageSendReqVO sendReqVO, Long userId);


    public AiChatMessage sendChatMessageCall(AiChatMessageSendReqVO sendReqVO, Long userId);
}
